package com.cmict.data.infra.service.message;


import com.cmict.data.framework.common.pojo.PageResult;
import com.cmict.data.infra.controller.admin.message.vo.AnnouncementDTO;
import com.cmict.data.infra.dal.dataobject.message.UserAnnouncement;
import com.cmict.data.infra.controller.admin.message.vo.UserAnnouncementQO;
import com.cmict.data.infra.controller.admin.message.vo.MyAnnouncementPageVO;
import com.cmict.data.infra.controller.admin.message.vo.UserAnnouncementPageVO;
import com.cmict.data.system.api.user.dto.AdminUserRespDTO;

import java.util.List;
import java.util.Map;

/**
 * 用户公告表
 *
 * @author hccake 2020-12-25 08:04:53
 */
public interface UserAnnouncementService  {

	/**
	 * 根据QueryObject查询分页数据
	 * @param qo 查询参数对象
	 * @return PageResult<AnnouncementVO> 分页数据
	 */
	PageResult<UserAnnouncementPageVO> queryPage(UserAnnouncementQO qo);

	PageResult<UserAnnouncementPageVO> templatePage(UserAnnouncementQO qo);


	Boolean removeSendDetail(Long id);

	/**
	 * 根据用户ID和公告id初始化一个新的用户公告关联对象
	 * @param userId 用户ID
	 * @param announcementId 公告ID
	 * @return UserAnnouncement
	 */
	UserAnnouncement prodUserAnnouncement(Long userId, String username, Long announcementId);

	/**
	 * 对用户公告进行已读标记
	 * @param userId 用户id
	 * @param announcementId 公告id
	 */
	void readAnnouncement(Long userId, List<Long> announcementId);

	/**
	 * 根据用户ID和公告id初始化一个新的用户公告关联对象
	 * @param userList 用户ID
	 * @param announcementId 公告ID
	 * @return UserAnnouncement
	 */
	void prodUserAnnouncement(List<AdminUserRespDTO> userList, Long announcementId);


	Boolean removeId(Long id);

	/**
	 * 根据QueryObject查询分页数据
	 * @param qo 查询参数对象
	 * @return PageResult<AnnouncementVO> 分页数据
	 */
	PageResult<MyAnnouncementPageVO> queryMyAnnouncePage(UserAnnouncementQO qo);

	Map<String,Object> getRemind(UserAnnouncementQO qo);

	Boolean removeByIds(List<Long> ids);

	long executeMessageClock(String userIdParam);

	List<AnnouncementDTO> getAnnouncementsAndNotices(UserAnnouncementQO userAnnouncementQO);
}